{"ast":null,"code":"var __rest = this && this.__rest || function (s, e) {\n  var t = {};\n  for (var p in s) {\n    if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n  }\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n  }\n  return t;\n};\n/**\n * Wrap of sub component which need use as Button capacity (like Icon component).\n *\n * This helps accessibility reader to tread as a interactive button to operation.\n */\nimport KeyCode from \"rc-util/es/KeyCode\";\nimport * as React from 'react';\nvar inlineStyle = {\n  border: 0,\n  background: 'transparent',\n  padding: 0,\n  lineHeight: 'inherit',\n  display: 'inline-block'\n};\nvar TransButton = /*#__PURE__*/React.forwardRef(function (props, ref) {\n  var onKeyDown = function onKeyDown(event) {\n    var keyCode = event.keyCode;\n    if (keyCode === KeyCode.ENTER) {\n      event.preventDefault();\n    }\n  };\n  var onKeyUp = function onKeyUp(event) {\n    var keyCode = event.keyCode;\n    var onClick = props.onClick;\n    if (keyCode === KeyCode.ENTER && onClick) {\n      onClick();\n    }\n  };\n  var style = props.style,\n    noStyle = props.noStyle,\n    disabled = props.disabled,\n    restProps = __rest(props, [\"style\", \"noStyle\", \"disabled\"]);\n  var mergedStyle = {};\n  if (!noStyle) {\n    mergedStyle = Object.assign({}, inlineStyle);\n  }\n  if (disabled) {\n    mergedStyle.pointerEvents = 'none';\n  }\n  mergedStyle = Object.assign(Object.assign({}, mergedStyle), style);\n  return /*#__PURE__*/React.createElement(\"div\", Object.assign({\n    role: \"button\",\n    tabIndex: 0,\n    ref: ref\n  }, restProps, {\n    onKeyDown: onKeyDown,\n    onKeyUp: onKeyUp,\n    style: mergedStyle\n  }));\n});\nexport default TransButton;","map":{"version":3,"names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","KeyCode","React","inlineStyle","border","background","padding","lineHeight","display","TransButton","forwardRef","props","ref","onKeyDown","event","keyCode","ENTER","preventDefault","onKeyUp","onClick","style","noStyle","disabled","restProps","mergedStyle","assign","pointerEvents","createElement","role","tabIndex"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/antd/es/_util/transButton.js"],"sourcesContent":["var __rest = this && this.__rest || function (s, e) {\n  var t = {};\n  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n  }\n  return t;\n};\n/**\n * Wrap of sub component which need use as Button capacity (like Icon component).\n *\n * This helps accessibility reader to tread as a interactive button to operation.\n */\nimport KeyCode from \"rc-util/es/KeyCode\";\nimport * as React from 'react';\nconst inlineStyle = {\n  border: 0,\n  background: 'transparent',\n  padding: 0,\n  lineHeight: 'inherit',\n  display: 'inline-block'\n};\nconst TransButton = /*#__PURE__*/React.forwardRef((props, ref) => {\n  const onKeyDown = event => {\n    const {\n      keyCode\n    } = event;\n    if (keyCode === KeyCode.ENTER) {\n      event.preventDefault();\n    }\n  };\n  const onKeyUp = event => {\n    const {\n      keyCode\n    } = event;\n    const {\n      onClick\n    } = props;\n    if (keyCode === KeyCode.ENTER && onClick) {\n      onClick();\n    }\n  };\n  const {\n      style,\n      noStyle,\n      disabled\n    } = props,\n    restProps = __rest(props, [\"style\", \"noStyle\", \"disabled\"]);\n  let mergedStyle = {};\n  if (!noStyle) {\n    mergedStyle = Object.assign({}, inlineStyle);\n  }\n  if (disabled) {\n    mergedStyle.pointerEvents = 'none';\n  }\n  mergedStyle = Object.assign(Object.assign({}, mergedStyle), style);\n  return /*#__PURE__*/React.createElement(\"div\", Object.assign({\n    role: \"button\",\n    tabIndex: 0,\n    ref: ref\n  }, restProps, {\n    onKeyDown: onKeyDown,\n    onKeyUp: onKeyUp,\n    style: mergedStyle\n  }));\n});\nexport default TransButton;"],"mappings":"AAAA,IAAIA,MAAM,GAAG,IAAI,IAAI,IAAI,CAACA,MAAM,IAAI,UAAUC,CAAC,EAAEC,CAAC,EAAE;EAClD,IAAIC,CAAC,GAAG,CAAC,CAAC;EACV,KAAK,IAAIC,CAAC,IAAIH,CAAC;IAAE,IAAII,MAAM,CAACC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACP,CAAC,EAAEG,CAAC,CAAC,IAAIF,CAAC,CAACO,OAAO,CAACL,CAAC,CAAC,GAAG,CAAC,EAAED,CAAC,CAACC,CAAC,CAAC,GAAGH,CAAC,CAACG,CAAC,CAAC;EAAC;EACjG,IAAIH,CAAC,IAAI,IAAI,IAAI,OAAOI,MAAM,CAACK,qBAAqB,KAAK,UAAU,EAAE,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEP,CAAC,GAAGC,MAAM,CAACK,qBAAqB,CAACT,CAAC,CAAC,EAAEU,CAAC,GAAGP,CAAC,CAACQ,MAAM,EAAED,CAAC,EAAE,EAAE;IAC3I,IAAIT,CAAC,CAACO,OAAO,CAACL,CAAC,CAACO,CAAC,CAAC,CAAC,GAAG,CAAC,IAAIN,MAAM,CAACC,SAAS,CAACO,oBAAoB,CAACL,IAAI,CAACP,CAAC,EAAEG,CAAC,CAACO,CAAC,CAAC,CAAC,EAAER,CAAC,CAACC,CAAC,CAACO,CAAC,CAAC,CAAC,GAAGV,CAAC,CAACG,CAAC,CAACO,CAAC,CAAC,CAAC;EACnG;EACA,OAAOR,CAAC;AACV,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,OAAOW,OAAO,MAAM,oBAAoB;AACxC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,IAAMC,WAAW,GAAG;EAClBC,MAAM,EAAE,CAAC;EACTC,UAAU,EAAE,aAAa;EACzBC,OAAO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